import { createRouter, createWebHistory } from "vue-router"

export default createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: "/",
            name: "Home",
            component: () => import('@/views/home/index.vue')
        },
        {
            path: '/hospital-detail',
            name: 'HospitalDetail',
            component: () => import('@/views/hospital/index.vue')
        }
    ],
    // 滚动行为，进入页面时页面自动滚动到顶部
    scrollBehavior() {
        return {
            top: 0,
            left: 0
        }
    }
})